public class digui {
    public static void main(String[] args) {
        digui digui = new digui();
        int[] feibonaqi = digui.feibonaqi(20);
        System.out.println(feibonaqi[2]);
        System.out.println(feibonaqi[3]);
        System.out.println(feibonaqi[4]);
        System.out.println(feibonaqi[20]);

        int[] ints = feibonaqi(15);
        System.out.println(ints[15]);

    }

    public static int[] feibonaqi(int j) {
        int[] arr = new int[j+1];
        arr[0]=1;
        arr[1]=1;
        for (int i1 = 2; i1 < arr.length; i1++) {
            arr[i1]=arr[i1-1]+arr[i1-2];
        }
        return arr;
    }
}
